import request from '@/request'

//上传文件
export function uploadFiles(data) {
  return request({
    url: `/files/upload`,
    method: 'post',
    headers: {
      'Content-Type': 'multipart/form-data',
    },
    data,
  })
}

export function updateUserPoints(data) {
  return request({
    url: `/resources/userFunctions/updateUserPoints`,
    method: 'post',
    data,
  })
}

export function getUserMessageList(query) {
  return request({
    url: `/resources/userFunctions/userMessage/list`,
    method: 'get',
    params: query
  })
}

export function addUserMessage(data) {
  return request({
    url: `/resources/userMessage`,
    method: 'post',
    data
  })
}
// 删除参数配置
export function delUserMessage(userMessageId) {
  return request({
    url: '/resources/userMessage/' + userMessageId,
    method: 'delete'
  })
}

export function listPointsShop(query) {
  return request({
    url: '/resources/pointsShop/list',
    method: 'get',
    params: query
  })
}

export function addUserShop(data) {
  return request({
    url: `/resources/userShop`,
    method: 'post',
    data
  })
}

export function listUserShop() {
  return request({
    url: `/resources/userShop/findAll`,
    method: 'get',
  })
}

export function userPointsList(query) {
  return request({
    url: `/resources/userFunctions/userPoints/list`,
    method: 'get',
    params: query
  })
}

export function userInfo() {
  return request({
    url: `/resources/userFunctions/user/info`,
    method: 'get',
  })
}
